/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package load.logic;

import core.ConnectException;
import core.InPort;
import core.OutPort;
import core.DispatcherPort;
import core.StdNode;
import core.TriggerPort;
/**
 *
 * @author Ben
 */
public class BoolNot extends StdNode {
	private DispatcherPort resChanged = new DispatcherPort();
	private TriggerPort argChanged = new TriggerPort() {
		@Override
		public void callInternal() throws ConnectException {
			resChanged.callTargets();
		}
	};
	private InPort arg1 = new InPort(Boolean.class, argChanged);
	private OutPort res = new OutPort(Boolean.class, resChanged)
	{
		@Override
		public Object getValueInternal() {
			return !(Boolean)arg1.getValue();
		}
	};

	public BoolNot() {
		autoPutPorts();
	}
}